<div class="page-content" >
            
    <div class="panel panel-default">
	 <div class="panel-heading">
         <ul class="breadcrumb"> 
				<li><a href="<{:U('School/index')}>">学校管理</a> </li>
				<li class="active">添加/修改学校</li>
			</ul>
		</div>	
        <div class="panel-body">
            <form id="form" class="form-horizontal" enctype="multipart/form-data" action="<{:U('School/add_school')}>" autocomplete="off" method="post" novalidate="novalidate">
                <input type="hidden" name="id" value="<{$data.id}>">
            
                <div class="form-group">
                    <label class="col-sm-2 control-label">学校名称</label>
                    <div class="col-sm-7">
                        <input type="text" name="name" class="form-control" value="<{$data.name}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                 
				 <div class="form-group">
                    <label class="col-sm-2 control-label">学校分类</label>
                    <div class="col-sm-7">
                        <select name="cate_name">
							<option value="">学校分类</option>
							<volist name="school_cate_name_list" id="vo">
							<option <if condition="$vo eq $data['cate_name']">selected="selected"</if> value="<{$vo}>"><{$vo}></option>
							</volist>
					</select>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
				
                    <div class="form-group">
                    <label class="col-sm-2 control-label">省份</label>
                    <div class="col-sm-7">
                       <select name="province_id">
							<option value="">请选择省份</option>
							<volist name="province_list" id="vo">
							<option <if condition="$vo['id'] eq $data['province_id']">selected="selected"</if> value="<{$vo.id}>"><{$vo.name}></option>
							</volist>
					</select>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
				
				<div class="form-group">
                    <label class="col-sm-2 control-label">备注</label>
                    <div class="col-sm-7">
                       <textarea style="width: 680px; height: 60px;" class="input_a1" id="textarea-content" name="remark" rows="2"><{$data.remark}></textarea>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
																
																<div class="form-group">
                    <label class="col-sm-2 control-label">代理数量</label>
                    <div class="col-sm-7">
                          <input type="text" name="agentLimit" class="form-control" value="<{$data.agentLimit}>">
																										  </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                  
						
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-7">
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
   

        </div>

<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            name: {
                message: '学校名称',
                validators: {
                    notEmpty: {
                        message: '学校名称不能为空'
                    },
                }
            },
			province_id: {
                message: '省份',
                validators: {
                    notEmpty: {
                        message: '请选择省份'
                    },
                }
            },
			  

        }
    });
	
 
});
 </script>
     
